﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

namespace SLBehaviourSystem
{
    [ActionComponent]
    public class CameraLookAtComponent : BehaviourComponent
    {
        public Vector3 TargetPos;
        protected override void OnInit()
        {
            base.OnInit();
        }
        public override BehaviourNodeState Excute()
        {
            enabled = true;
            return BehaviourNodeState.Success;
        }

        private void Update()
        {
            //ModelGetter.ModelGo.transform.LookAt(Agent);
            Camera.main.transform.LookAt(transform);
        }

        public override void Reset()
        {
            base.Reset();
            enabled = false;
        }

    }
}